package com.neuedu.spring.mybatis.po;

import java.io.Serializable;
import java.util.Date;

/**
 * 常数项目
 * @TableName constants_item
 */
public class ConstantsItem implements Serializable {
    /**
     * 主键
     */
    private Long itemId;

    /**
     * 代码
     */
    private String code;

    /**
     * 名称
     */
    private String caption;

    /**
     * 类型
     */
    private String type;

    /**
     * 类型名称
     */
    private String typeName;

    /**
     * 是否有效
     */
    private String del;

    /**
     * 创建时间
     */
    private Date createtime;

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getItemId() {
        return itemId;
    }

    /**
     * 主键
     */
    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    /**
     * 代码
     */
    public String getCode() {
        return code;
    }

    /**
     * 代码
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 名称
     */
    public String getCaption() {
        return caption;
    }

    /**
     * 名称
     */
    public void setCaption(String caption) {
        this.caption = caption;
    }

    /**
     * 类型
     */
    public String getType() {
        return type;
    }

    /**
     * 类型
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 类型名称
     */
    public String getTypeName() {
        return typeName;
    }

    /**
     * 类型名称
     */
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    /**
     * 是否有效
     */
    public String getDel() {
        return del;
    }

    /**
     * 是否有效
     */
    public void setDel(String del) {
        this.del = del;
    }

    /**
     * 创建时间
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 创建时间
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ConstantsItem other = (ConstantsItem) that;
        return (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getCaption() == null ? other.getCaption() == null : this.getCaption().equals(other.getCaption()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
            && (this.getDel() == null ? other.getDel() == null : this.getDel().equals(other.getDel()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getCaption() == null) ? 0 : getCaption().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
        result = prime * result + ((getDel() == null) ? 0 : getDel().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", itemId=").append(itemId);
        sb.append(", code=").append(code);
        sb.append(", caption=").append(caption);
        sb.append(", type=").append(type);
        sb.append(", typeName=").append(typeName);
        sb.append(", del=").append(del);
        sb.append(", createtime=").append(createtime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}